﻿<UserControl x:Class="theeg.DependencyAnalysis.CommonAddin.Views.ProximityGraph"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:graphWpf="clr-namespace:theeg.GraphWpf;assembly=theeg.GraphWpf"
             xmlns:behaviors2="clr-namespace:theeg.DependencyAnalysis.CommonAddin.Behaviors"
             xmlns:views="clr-namespace:theeg.DependencyAnalysis.CommonAddin.Views"
             FontWeight="Normal" FontSize="12"
             mc:Ignorable="d" x:Name="control"
             d:DesignHeight="400" d:DesignWidth="1000">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/theeg.GraphWpf;component/Resources/Theme.xaml" />
                <ResourceDictionary Source="../Resources/CommonStyles.xaml"></ResourceDictionary>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>

    <Grid ClipToBounds="True">
        <Grid.Tag>
            <behaviors2:History x:Name="history" CurrentItemChanged="HistoryPropertyChanged"></behaviors2:History>
        </Grid.Tag>
        <graphWpf:Sketch x:Name="Sketch" Background="Transparent" InputUp="ClickGraphItem"></graphWpf:Sketch>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Top">
            <Button Command="{Binding ElementName=history, Path=BackCommand}" Style="{StaticResource FlatButtonStyle}">
                <Viewbox Width="25">
                    <Canvas Width="100" Height="100">
                        <Path Stroke="#FFFFFFFF" StrokeThickness="6" Fill="#01000000">
                            <Path.Data>
                                <EllipseGeometry RadiusX="47" RadiusY="47" Center="50,50" />
                            </Path.Data>
                        </Path>
                        <Path Fill="#FFFFFFFF">
                            <Path.Data>M79,53L32,53 46,67 38,67 21,50 38,33 46,33 32,47 79,47z</Path.Data>
                        </Path>
                    </Canvas>
                </Viewbox>
            </Button>
            <Button Command="{Binding ElementName=history, Path=ForeCommand}" Style="{StaticResource FlatButtonStyle}">
                <Viewbox Width="25">
                    <Canvas Width="100" Height="100">
                        <Path Stroke="#FFFFFFFF" StrokeThickness="6" Fill="#01000000">
                            <Path.Data>
                                <EllipseGeometry RadiusX="47" RadiusY="47" Center="50,50" />
                            </Path.Data>
                        </Path>
                        <Path Fill="#FFFFFF">
                            <Path.Data>M21,47L68,47 54,33 62,33 79,50 62,67 54,67 68,53 21,53z</Path.Data>
                        </Path>
                    </Canvas>
                </Viewbox>
            </Button>
            <TextBlock FontSize="18" Text="{Binding Descriptor.FullName}" Foreground="Gray" Margin="3"></TextBlock>
        </StackPanel>
    </Grid>
</UserControl>
